package org.tacademy.homework3;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.EditText;

public class WebPageActivity extends Activity {
	
	public static final String TAG = "SubPage01Activity";
	private WebView webView;
	private EditText editText;
	private Handler handler = new Handler();
	private Button loadBtn;
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.webview1);
        
        loadBtn = (Button)findViewById(R.id.loadBtn);
        editText = (EditText)findViewById(R.id.urlInput);
        webView = (WebView)findViewById(R.id.webview);
        
        webView.loadUrl("http://m.naver.com");
        
        loadBtn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				webView.loadUrl(editText.getText().toString());
			}
		});
    }
	
}
